package org.groupg.practice.guiPractice.awt;

import java.awt.*;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;

public class AutoClicker {
    public static void main(String[] args) throws AWTException {
        Robot robot = new Robot();

        // 移动鼠标到(100,100)位置
        robot.mouseMove(100, 100);

        // 鼠标左键点击
        robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
        robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);

        // 键盘输入
        robot.keyPress(KeyEvent.VK_H);
        robot.keyRelease(KeyEvent.VK_H);
        robot.keyPress(KeyEvent.VK_I);
        robot.keyRelease(KeyEvent.VK_I);
    }
}